package com.datang.petstore.controller;

/*
 * @auther 顶风少年
 * @mail dfsn19970313@foxmail.com
 * @date 2019-11-04 10:18
 * @notify 分享语句Api
 * @version 1.0
 */

import com.datang.petstore.entity.ShareText;
import com.datang.petstore.resultpage.Result;
import com.datang.petstore.service.ShareTextService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ShareTextController {

    @Autowired
    private ShareTextService shareTextService;

    /*
     * @author 顶风少年
     * @date 2019/11/4 10:19
     * @mail dfsn199703132038@foxmail.com
     * @throws
     * @param
     * @result java.util.List<com.datang.petstore.entity.ShareText>
     * @notify 获取分享语句
     * version 1.0
     */
    @GetMapping(value = "sharetext")
    public Result getAllShareText() {
        List<ShareText> all = shareTextService.getAllshareText();
        return Result.ok(all);
    }
}
